package com.Liuhang.JDBC;

import java.sql.*;


public class util {

    final static String url ="jdbc:mysql://localhost:3306/java01?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true";
    final static String username = "root";
    final static String passwd = "root";
    private static Connection connection;
    private static Statement st;
    private static int pid_count;



    public static Statement getStatement() throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        connection = DriverManager.getConnection(url,username,passwd);
        st = connection.createStatement();
        return st;
    }

    public static Connection getConnection(){
        return connection;
    }


    public  static boolean isNull(Object obj){
        if(obj == null){
            return true;
        }
        return false;
    }


}
